\(\int \frac {2 b^{2/3}+x^2}{b^{4/3}+b^{2/3} x^2+x^4} \, dx\) [108]

   Optimal result
   Rubi [A] (verified)
   Mathematica [C] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [C] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 32, antiderivative size = 124 \[ \int \frac {2 b^{2/3}+x^2}{b^{4/3}+b^{2/3} x^2+x^4} \, dx=-\frac {\sqrt {3} \arctan \left (\frac {\sqrt [3]{b}-2 x}{\sqrt {3} \sqrt [3]{b}}\right )}{2 \sqrt [3]{b}}+\frac {\sqrt {3} \arctan \left (\frac {\sqrt [3]{b}+2 x}{\sqrt {3} \sqrt [3]{b}}\right )}{2 \sqrt [3]{b}}-\frac {\log \left (b^{2/3}-\sqrt [3]{b} x+x^2\right )}{4 \sqrt [3]{b}}+\frac {\log \left (b^{2/3}+\sqrt [3]{b} x+x^2\right )}{4 \sqrt [3]{b}} \]

[Out]

-1/4*ln(b^(2/3)-b^(1/3)*x+x^2)/b^(1/3)+1/4*ln(b^(2/3)+b^(1/3)*x+x^2)/b^(1/3)-1/2*arctan(1/3*(b^(1/3)-2*x)/b^(1
/3)*3^(1/2))*3^(1/2)/b^(1/3)+1/2*arctan(1/3*(b^(1/3)+2*x)/b^(1/3)*3^(1/2))*3^(1/2)/b^(1/3)

Rubi [A] (verified)

Time = 0.05 (sec) , antiderivative size = 124, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.156, Rules used = {1183, 648, 631, 210, 642} \[ \int \frac {2 b^{2/3}+x^2}{b^{4/3}+b^{2/3} x^2+x^4} \, dx=-\frac {\sqrt {3} \arctan \left (\frac {\sqrt [3]{b}-2 x}{\sqrt {3} \sqrt [3]{b}}\right )}{2 \sqrt [3]{b}}+\frac {\sqrt {3} \arctan \left (\frac {\sqrt [3]{b}+2 x}{\sqrt {3} \sqrt [3]{b}}\right )}{2 \sqrt [3]{b}}-\frac {\log \left (b^{2/3}-\sqrt [3]{b} x+x^2\right )}{4 \sqrt [3]{b}}+\frac {\log \left (b^{2/3}+\sqrt [3]{b} x+x^2\right )}{4 \sqrt [3]{b}} \]

[In]

Int[(2*b^(2/3) + x^2)/(b^(4/3) + b^(2/3)*x^2 + x^4),x]

[Out]

-1/2*(Sqrt[3]*ArcTan[(b^(1/3) - 2*x)/(Sqrt[3]*b^(1/3))])/b^(1/3) + (Sqrt[3]*ArcTan[(b^(1/3) + 2*x)/(Sqrt[3]*b^
(1/3))])/(2*b^(1/3)) - Log[b^(2/3) - b^(1/3)*x + x^2]/(4*b^(1/3)) + Log[b^(2/3) + b^(1/3)*x + x^2]/(4*b^(1/3))

Rule 210

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[-b, 2])^(-1))*ArcTan[Rt[-b, 2]*(x/Rt[-a, 2])
], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rule 631

Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> With[{q = 1 - 4*Simplify[a*(c/b^2)]}, Dist[-2/b, Sub
st[Int[1/(q - x^2), x], x, 1 + 2*c*(x/b)], x] /; RationalQ[q] && (EqQ[q^2, 1] ||  !RationalQ[b^2 - 4*a*c])] /;
 FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 642

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[d*(Log[RemoveContent[a + b*x +
c*x^2, x]]/b), x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rule 648

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 1183

Int[((d_) + (e_.)*(x_)^2)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[a/c, 2]}, With[{r =
Rt[2*q - b/c, 2]}, Dist[1/(2*c*q*r), Int[(d*r - (d - e*q)*x)/(q - r*x + x^2), x], x] + Dist[1/(2*c*q*r), Int[(
d*r + (d - e*q)*x)/(q + r*x + x^2), x], x]]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2
- b*d*e + a*e^2, 0] && NegQ[b^2 - 4*a*c]

Rubi steps \begin{align*} \text {integral}& = \frac {\int \frac {2 b-b^{2/3} x}{b^{2/3}-\sqrt [3]{b} x+x^2} \, dx}{2 b}+\frac {\int \frac {2 b+b^{2/3} x}{b^{2/3}+\sqrt [3]{b} x+x^2} \, dx}{2 b} \\ & = \frac {3}{4} \int \frac {1}{b^{2/3}-\sqrt [3]{b} x+x^2} \, dx+\frac {3}{4} \int \frac {1}{b^{2/3}+\sqrt [3]{b} x+x^2} \, dx-\frac {\int \frac {-\sqrt [3]{b}+2 x}{b^{2/3}-\sqrt [3]{b} x+x^2} \, dx}{4 \sqrt [3]{b}}+\frac {\int \frac {\sqrt [3]{b}+2 x}{b^{2/3}+\sqrt [3]{b} x+x^2} \, dx}{4 \sqrt [3]{b}} \\ & = -\frac {\log \left (b^{2/3}-\sqrt [3]{b} x+x^2\right )}{4 \sqrt [3]{b}}+\frac {\log \left (b^{2/3}+\sqrt [3]{b} x+x^2\right )}{4 \sqrt [3]{b}}+\frac {3 \text {Subst}\left (\int \frac {1}{-3-x^2} \, dx,x,1-\frac {2 x}{\sqrt [3]{b}}\right )}{2 \sqrt [3]{b}}-\frac {3 \text {Subst}\left (\int \frac {1}{-3-x^2} \, dx,x,1+\frac {2 x}{\sqrt [3]{b}}\right )}{2 \sqrt [3]{b}} \\ & = -\frac {\sqrt {3} \tan ^{-1}\left (\frac {\sqrt [3]{b}-2 x}{\sqrt {3} \sqrt [3]{b}}\right )}{2 \sqrt [3]{b}}+\frac {\sqrt {3} \tan ^{-1}\left (\frac {\sqrt [3]{b}+2 x}{\sqrt {3} \sqrt [3]{b}}\right )}{2 \sqrt [3]{b}}-\frac {\log \left (b^{2/3}-\sqrt [3]{b} x+x^2\right )}{4 \sqrt [3]{b}}+\frac {\log \left (b^{2/3}+\sqrt [3]{b} x+x^2\right )}{4 \sqrt [3]{b}} \\ \end{align*}

Mathematica [C] (verified)

Result contains complex when optimal does not.

Time = 0.09 (sec) , antiderivative size = 115, normalized size of antiderivative = 0.93 \[ \int \frac {2 b^{2/3}+x^2}{b^{4/3}+b^{2/3} x^2+x^4} \, dx=\frac {\sqrt [4]{-1} \left (\sqrt {-i+\sqrt {3}} \left (-3 i+\sqrt {3}\right ) \arctan \left (\frac {(1+i) x}{\sqrt {i+\sqrt {3}} \sqrt [3]{b}}\right )-\sqrt {i+\sqrt {3}} \left (3 i+\sqrt {3}\right ) \text {arctanh}\left (\frac {(1+i) x}{\sqrt {-i+\sqrt {3}} \sqrt [3]{b}}\right )\right )}{2 \sqrt {6} \sqrt [3]{b}} \]

[In]

Integrate[(2*b^(2/3) + x^2)/(b^(4/3) + b^(2/3)*x^2 + x^4),x]

[Out]

((-1)^(1/4)*(Sqrt[-I + Sqrt[3]]*(-3*I + Sqrt[3])*ArcTan[((1 + I)*x)/(Sqrt[I + Sqrt[3]]*b^(1/3))] - Sqrt[I + Sq
rt[3]]*(3*I + Sqrt[3])*ArcTanh[((1 + I)*x)/(Sqrt[-I + Sqrt[3]]*b^(1/3))]))/(2*Sqrt[6]*b^(1/3))

Maple [A] (verified)

Time = 0.12 (sec) , antiderivative size = 87, normalized size of antiderivative = 0.70

method result size
default \(\frac {-\frac {\ln \left (b^{\frac {2}{3}}-b^{\frac {1}{3}} x +x^{2}\right )}{2}+\sqrt {3}\, \arctan \left (\frac {\left (-b^{\frac {1}{3}}+2 x \right ) \sqrt {3}}{3 b^{\frac {1}{3}}}\right )}{2 b^{\frac {1}{3}}}+\frac {\frac {\ln \left (b^{\frac {2}{3}}+b^{\frac {1}{3}} x +x^{2}\right )}{2}+\arctan \left (\frac {\left (b^{\frac {1}{3}}+2 x \right ) \sqrt {3}}{3 b^{\frac {1}{3}}}\right ) \sqrt {3}}{2 b^{\frac {1}{3}}}\) \(87\)

[In]

int((2*b^(2/3)+x^2)/(b^(4/3)+b^(2/3)*x^2+x^4),x,method=_RETURNVERBOSE)

[Out]

1/2/b^(1/3)*(-1/2*ln(b^(2/3)-b^(1/3)*x+x^2)+3^(1/2)*arctan(1/3*(-b^(1/3)+2*x)*3^(1/2)/b^(1/3)))+1/2/b^(1/3)*(1
/2*ln(b^(2/3)+b^(1/3)*x+x^2)+arctan(1/3*(b^(1/3)+2*x)/b^(1/3)*3^(1/2))*3^(1/2))

Fricas [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 264, normalized size of antiderivative = 2.13 \[ \int \frac {2 b^{2/3}+x^2}{b^{4/3}+b^{2/3} x^2+x^4} \, dx=\left [\frac {\sqrt {3} b \sqrt {-\frac {1}{b^{\frac {2}{3}}}} \log \left (\frac {2 \, x^{3} + \sqrt {3} {\left (2 \, b^{\frac {2}{3}} x^{2} + b x - b^{\frac {4}{3}}\right )} \sqrt {-\frac {1}{b^{\frac {2}{3}}}} - 3 \, b^{\frac {2}{3}} x - b}{x^{3} + b}\right ) + \sqrt {3} b \sqrt {-\frac {1}{b^{\frac {2}{3}}}} \log \left (\frac {2 \, x^{3} + \sqrt {3} {\left (2 \, b^{\frac {2}{3}} x^{2} - b x - b^{\frac {4}{3}}\right )} \sqrt {-\frac {1}{b^{\frac {2}{3}}}} - 3 \, b^{\frac {2}{3}} x + b}{x^{3} - b}\right ) + b^{\frac {2}{3}} \log \left (x^{2} + b^{\frac {1}{3}} x + b^{\frac {2}{3}}\right ) - b^{\frac {2}{3}} \log \left (x^{2} - b^{\frac {1}{3}} x + b^{\frac {2}{3}}\right )}{4 \, b}, \frac {2 \, \sqrt {3} b^{\frac {2}{3}} \arctan \left (\frac {\sqrt {3} {\left (2 \, x + b^{\frac {1}{3}}\right )}}{3 \, b^{\frac {1}{3}}}\right ) - 2 \, \sqrt {3} b^{\frac {2}{3}} \arctan \left (-\frac {\sqrt {3} {\left (2 \, x - b^{\frac {1}{3}}\right )}}{3 \, b^{\frac {1}{3}}}\right ) + b^{\frac {2}{3}} \log \left (x^{2} + b^{\frac {1}{3}} x + b^{\frac {2}{3}}\right ) - b^{\frac {2}{3}} \log \left (x^{2} - b^{\frac {1}{3}} x + b^{\frac {2}{3}}\right )}{4 \, b}\right ] \]

[In]

integrate((2*b^(2/3)+x^2)/(b^(4/3)+b^(2/3)*x^2+x^4),x, algorithm="fricas")

[Out]

[1/4*(sqrt(3)*b*sqrt(-1/b^(2/3))*log((2*x^3 + sqrt(3)*(2*b^(2/3)*x^2 + b*x - b^(4/3))*sqrt(-1/b^(2/3)) - 3*b^(
2/3)*x - b)/(x^3 + b)) + sqrt(3)*b*sqrt(-1/b^(2/3))*log((2*x^3 + sqrt(3)*(2*b^(2/3)*x^2 - b*x - b^(4/3))*sqrt(
-1/b^(2/3)) - 3*b^(2/3)*x + b)/(x^3 - b)) + b^(2/3)*log(x^2 + b^(1/3)*x + b^(2/3)) - b^(2/3)*log(x^2 - b^(1/3)
*x + b^(2/3)))/b, 1/4*(2*sqrt(3)*b^(2/3)*arctan(1/3*sqrt(3)*(2*x + b^(1/3))/b^(1/3)) - 2*sqrt(3)*b^(2/3)*arcta
n(-1/3*sqrt(3)*(2*x - b^(1/3))/b^(1/3)) + b^(2/3)*log(x^2 + b^(1/3)*x + b^(2/3)) - b^(2/3)*log(x^2 - b^(1/3)*x
 + b^(2/3)))/b]

Sympy [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.13 (sec) , antiderivative size = 143, normalized size of antiderivative = 1.15 \[ \int \frac {2 b^{2/3}+x^2}{b^{4/3}+b^{2/3} x^2+x^4} \, dx=\frac {\left (- \frac {1}{4} - \frac {\sqrt {3} i}{4}\right ) \log {\left (2 \sqrt [3]{b} \left (- \frac {1}{4} - \frac {\sqrt {3} i}{4}\right ) + x \right )} + \left (- \frac {1}{4} + \frac {\sqrt {3} i}{4}\right ) \log {\left (2 \sqrt [3]{b} \left (- \frac {1}{4} + \frac {\sqrt {3} i}{4}\right ) + x \right )} + \left (\frac {1}{4} - \frac {\sqrt {3} i}{4}\right ) \log {\left (2 \sqrt [3]{b} \left (\frac {1}{4} - \frac {\sqrt {3} i}{4}\right ) + x \right )} + \left (\frac {1}{4} + \frac {\sqrt {3} i}{4}\right ) \log {\left (2 \sqrt [3]{b} \left (\frac {1}{4} + \frac {\sqrt {3} i}{4}\right ) + x \right )}}{\sqrt [3]{b}} \]

[In]

integrate((2*b**(2/3)+x**2)/(b**(4/3)+b**(2/3)*x**2+x**4),x)

[Out]

((-1/4 - sqrt(3)*I/4)*log(2*b**(1/3)*(-1/4 - sqrt(3)*I/4) + x) + (-1/4 + sqrt(3)*I/4)*log(2*b**(1/3)*(-1/4 + s
qrt(3)*I/4) + x) + (1/4 - sqrt(3)*I/4)*log(2*b**(1/3)*(1/4 - sqrt(3)*I/4) + x) + (1/4 + sqrt(3)*I/4)*log(2*b**
(1/3)*(1/4 + sqrt(3)*I/4) + x))/b**(1/3)

Maxima [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 88, normalized size of antiderivative = 0.71 \[ \int \frac {2 b^{2/3}+x^2}{b^{4/3}+b^{2/3} x^2+x^4} \, dx=\frac {\sqrt {3} \arctan \left (\frac {\sqrt {3} {\left (2 \, x + b^{\frac {1}{3}}\right )}}{3 \, b^{\frac {1}{3}}}\right )}{2 \, b^{\frac {1}{3}}} + \frac {\sqrt {3} \arctan \left (\frac {\sqrt {3} {\left (2 \, x - b^{\frac {1}{3}}\right )}}{3 \, b^{\frac {1}{3}}}\right )}{2 \, b^{\frac {1}{3}}} + \frac {\log \left (x^{2} + b^{\frac {1}{3}} x + b^{\frac {2}{3}}\right )}{4 \, b^{\frac {1}{3}}} - \frac {\log \left (x^{2} - b^{\frac {1}{3}} x + b^{\frac {2}{3}}\right )}{4 \, b^{\frac {1}{3}}} \]

[In]

integrate((2*b^(2/3)+x^2)/(b^(4/3)+b^(2/3)*x^2+x^4),x, algorithm="maxima")

[Out]

1/2*sqrt(3)*arctan(1/3*sqrt(3)*(2*x + b^(1/3))/b^(1/3))/b^(1/3) + 1/2*sqrt(3)*arctan(1/3*sqrt(3)*(2*x - b^(1/3
))/b^(1/3))/b^(1/3) + 1/4*log(x^2 + b^(1/3)*x + b^(2/3))/b^(1/3) - 1/4*log(x^2 - b^(1/3)*x + b^(2/3))/b^(1/3)

Giac [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 92, normalized size of antiderivative = 0.74 \[ \int \frac {2 b^{2/3}+x^2}{b^{4/3}+b^{2/3} x^2+x^4} \, dx=\frac {\sqrt {3} \arctan \left (\frac {\sqrt {3} {\left (2 \, x + b^{\frac {1}{3}}\right )}}{3 \, {\left | b \right |}^{\frac {1}{3}}}\right )}{2 \, {\left | b \right |}^{\frac {1}{3}}} + \frac {\sqrt {3} \arctan \left (\frac {\sqrt {3} {\left (2 \, x - b^{\frac {1}{3}}\right )}}{3 \, {\left | b \right |}^{\frac {1}{3}}}\right )}{2 \, {\left | b \right |}^{\frac {1}{3}}} + \frac {\log \left (x^{2} + b^{\frac {1}{3}} x + b^{\frac {2}{3}}\right )}{4 \, b^{\frac {1}{3}}} - \frac {\log \left (x^{2} - b^{\frac {1}{3}} x + b^{\frac {2}{3}}\right )}{4 \, b^{\frac {1}{3}}} \]

[In]

integrate((2*b^(2/3)+x^2)/(b^(4/3)+b^(2/3)*x^2+x^4),x, algorithm="giac")

[Out]

1/2*sqrt(3)*arctan(1/3*sqrt(3)*(2*x + b^(1/3))/abs(b)^(1/3))/abs(b)^(1/3) + 1/2*sqrt(3)*arctan(1/3*sqrt(3)*(2*
x - b^(1/3))/abs(b)^(1/3))/abs(b)^(1/3) + 1/4*log(x^2 + b^(1/3)*x + b^(2/3))/b^(1/3) - 1/4*log(x^2 - b^(1/3)*x
 + b^(2/3))/b^(1/3)

Mupad [B] (verification not implemented)

Time = 14.10 (sec) , antiderivative size = 133, normalized size of antiderivative = 1.07 \[ \int \frac {2 b^{2/3}+x^2}{b^{4/3}+b^{2/3} x^2+x^4} \, dx=\frac {\sqrt {8}\,\mathrm {atan}\left (x\,\sqrt {-\frac {1}{8\,b^{2/3}}-\frac {\sqrt {3}\,1{}\mathrm {i}}{8\,b^{2/3}}}\,1{}\mathrm {i}+\sqrt {3}\,x\,\sqrt {-\frac {1}{8\,b^{2/3}}-\frac {\sqrt {3}\,1{}\mathrm {i}}{8\,b^{2/3}}}\right )\,\sqrt {-\frac {1+\sqrt {3}\,1{}\mathrm {i}}{b^{2/3}}}\,1{}\mathrm {i}}{4}+\frac {\sqrt {8}\,\mathrm {atan}\left (x\,\sqrt {-\frac {1}{8\,b^{2/3}}+\frac {\sqrt {3}\,1{}\mathrm {i}}{8\,b^{2/3}}}\,1{}\mathrm {i}-\sqrt {3}\,x\,\sqrt {-\frac {1}{8\,b^{2/3}}+\frac {\sqrt {3}\,1{}\mathrm {i}}{8\,b^{2/3}}}\right )\,\sqrt {\frac {-1+\sqrt {3}\,1{}\mathrm {i}}{b^{2/3}}}\,1{}\mathrm {i}}{4} \]

[In]

int((2*b^(2/3) + x^2)/(b^(4/3) + x^4 + b^(2/3)*x^2),x)

[Out]

(8^(1/2)*atan(x*(- (3^(1/2)*1i)/(8*b^(2/3)) - 1/(8*b^(2/3)))^(1/2)*1i + 3^(1/2)*x*(- (3^(1/2)*1i)/(8*b^(2/3))
- 1/(8*b^(2/3)))^(1/2))*(-(3^(1/2)*1i + 1)/b^(2/3))^(1/2)*1i)/4 + (8^(1/2)*atan(x*((3^(1/2)*1i)/(8*b^(2/3)) -
1/(8*b^(2/3)))^(1/2)*1i - 3^(1/2)*x*((3^(1/2)*1i)/(8*b^(2/3)) - 1/(8*b^(2/3)))^(1/2))*((3^(1/2)*1i - 1)/b^(2/3
))^(1/2)*1i)/4